<?php
/**
 * @author		João Batista Neto
 * @package		rpo
 * @subpackage	http\exception
 * @category	Http
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License
 */
namespace rpo\http\exception;

use rpo\http\exception\interfaces\AbstractClientException;
use \Exception;

/**
 * A server SHOULD return a response with this status code if a request included a Range request-header
 * field (section 14.35), and none of the range-specifier values in this field overlap the current extent
 * of the selected resource, and the request did not include an If-Range request-header field.
 * <p>
 * (For byte-ranges, this means that the first- byte-pos of all of the byte-range-spec values were greater
 * than the current length of the selected resource.
 *
 * When this status code is returned for a byte-range request, the response SHOULD include a Content-Range
 * entity-header field specifying the current length of the selected resource (see section 14.16).
 * This response MUST NOT use the multipart/byteranges content- type.</p>
 * @author		João Batista Neto
 * @final
 * @package		rpo
 * @subpackage	http\exception
 * @category	Http
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License
 * @link		http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16
 */
final class RequestedRangeNotSatisfiableException extends AbstractClientException {
	/**
	 * Constroi o objeto da exceção
	 * @param string $message A exceção
	 * @param Exception $parent
	 */
	public function __construct( $message , Exception $previous = null ){
		parent::__construct( $message , 416 , $previous );
	}
}